﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Snake
{
    class FoodObject
    {
        Texture2D f_foodTexture;
        Vector2 f_foodPos;
        public FoodObject(Texture2D inTexture)
        {
            f_foodTexture = inTexture;
            Random random = new Random();
            f_foodPos.X = random.Next(65, 535);
            f_foodPos.Y = random.Next(65, 335);
 
        }
        public Texture2D foodTexture {
            get {return f_foodTexture ;}
            set {f_foodTexture = value ;}
        }
        public Vector2 foodPos {
            get {return f_foodPos ;}
            set {f_foodPos = value ;} 
        }
        public void NewPos()
        {
            Random random = new Random();
            f_foodPos.X = random.Next(65, 535);
            f_foodPos.Y = random.Next(65, 335);
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(f_foodTexture, f_foodPos, Color.White);
            spriteBatch.End();
        }
    }
}
